package com.lxf.clouduser.mapper;

import com.lxf.clouduser.bean.GroupBean;
import com.lxf.clouduser.bean.UserGroupBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 罗兴发
 * @data 2025/6/13 9:34
 * @description：群-持久层
 */
@Mapper
public interface GroupMapper {
    int addGroup(@Param("list") List<GroupBean> list);
    int delGroup(@Param("groupId") String groupId);
    GroupBean getGroupByGroupId(@Param("groupId") String groupId);
    int delGroupUser(@Param("groupId") String groupId,
                     @Param("userId") Integer userId);
    UserGroupBean getGroupUserByGroupId(@Param("groupId") String groupId,
                                        @Param("userId") Integer userId);
    int addGroupUser(@Param("list") List<UserGroupBean> list);

    int updateGroupByGroupId(@Param("g") GroupBean g);

    List<UserGroupBean> getGroupByGroupUserId(@Param("uid") String uid);
}
